package com.tbit.main.constant;

/**
 * 车辆异常状态
 *
 * @author Leon
 * 2019年11月16日 下午4:54:22
 */
public class MachineAbnormalConstant {
    /**
     * 太阳能未充电
     */
    public static final int SOLAR_UNCHARGED = 11;
    /**
     * 超出区域
     */
    public static final int MACHINE_ABNORMAL_CCQY = 0;
    /**
     * 站外
     */
    public static final int MACHINE_ABNORMAL_ZW = 1;
    /**
     * 无信号
     */
    public static final int MACHINE_ABNORMAL_WXH = 2;
    /**
     * 电池异常
     */
    public static final int MACHINE_ABNORMAL_DCYC = 3;
    /**
     * 禁停区异常
     */
    public static final int MACHINE_ABNORMAL_JTYC = 4;
    /**
     * 未关电池锁异常
     */
    public static final int MACHINE_ABNORMAL_DCS = 5;
    /**
     * 摄像头异常
     */
    public static final int MACHINE_ABNORMAL_SXT = 6;
    /**
     * 头盔锁异常
     */
    public static final int MACHINE_ABNORMAL__HELMET = 7;
    /**
     * 头盔丢失
     */
    public static final int MACHINE_ABNORMAL__HELMET_LOSE = 8;
    /**
     * 载人设备异常
     */
    public static final int MACHINE_ABNORMAL_MANNED = 9;
    /**
     * 载人设备丢失
     */
    public static final int MACHINE_ABNORMAL_MANNED_LOSE = 10;
    /**
     * 扣押状态
     */
    public static final int MACHINE_ABNORMAL_IMPOUND = 12;
    /**
     * 入库中
     */
    public static final int MACHINE_ABNORMAL_STORAGE = 13;

    public static String parse(int abnormal) {
        switch (abnormal) {
            case SOLAR_UNCHARGED:
                return "太阳能未充电";
            case MACHINE_ABNORMAL_CCQY:
                return "超出区域";
            case MACHINE_ABNORMAL_ZW:
                return "站外";
            case MACHINE_ABNORMAL_WXH:
                return "无信号";
            case MACHINE_ABNORMAL_DCYC:
                return "电池异常";
            case MACHINE_ABNORMAL_JTYC:
                return "禁停区异常";
            case MACHINE_ABNORMAL_DCS:
                return "未关电池锁";
            case MACHINE_ABNORMAL_SXT:
                return "摄像头异常";
            case MACHINE_ABNORMAL__HELMET:
                return "头盔锁异常";
            case MACHINE_ABNORMAL__HELMET_LOSE:
                return "头盔丢失";
            case MACHINE_ABNORMAL_MANNED:
                return "载人设备异常";
            case MACHINE_ABNORMAL_MANNED_LOSE:
                return "载人设备丢失";
            case MACHINE_ABNORMAL_IMPOUND:
                return "扣押";
            case MACHINE_ABNORMAL_STORAGE:
                return "入库中";
            default:
                return "未知异常" + abnormal;
        }
    }
}
